home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / M / Menu Compiler(v1.2).cpt / Menu Compiler documentation < prev    next >
Text File  |  1987-10-19  |  5KB  |  96 lines

  1. Creative Solutions Co.
  2. 305 So. 41st Street
  3. Philadelphia, PA 19104
  4. (215) 387-4751
  5.  
  6.                 Menu Compiler v1.2
  7.                  October 19, 1987
  8.  
  9. Generate Red Ryder 10.0 Menu procedure files using the RR Menu Compiler V1.2
  10.  
  11. Bug reports to MAYERK via GEnie e-mail
  12. Source code available! Send requests to MAYERK
  13.  
  14. ----- MANIFEST
  15.  
  16. Menu Compiler.PROC
  17. Menu Compiler documentation
  18. Test.Menus.MC
  19.  
  20. If you are missing any of these files, search the Freesoft RT software library for the keywords "MENU COMPILER", "MAYERK", or "CREATIVE SOLUTIONS".
  21.  
  22. ----- VERSION 1.2 UPDATE REPORT
  23.  
  24. This version introduces error checking to prevent strings from exceeding limits set by Red Ryder. The RR compiler does not report when a MENUDOES text is longer than 40 characters, the established limit. It can be quit frustrating trying to debug this since you don't know what's wrong when RR says "Procedure not found, Use \path:filename" during execution. In addition, MC 1.2 now checks all lines to see if they are under the 79 character per line limit. See the table below for absolute limits of <STR_EXP>.
  25.  
  26.      Text                    Character limit
  27.      ----                    ---------------
  28.      all lines               <= 79
  29.      define menu <STR_EXP>   <= 67
  30.      add to menu <STR_EXP>   <= 67
  31.      menudoes <STR_EXP>      <= 40
  32.  
  33. Also, numerous bug fixes to the entire error checking/correction facility.
  34.  
  35. ----- INTRODUCTION
  36.  
  37. I wrote Menu Compiler.PROC to generate menus much more easily than Scott Watson's somewhat tortured command structure. An input file specifying the contents of a menu is read by Menu Compiler and a procedure source file is generated along with its compiled object file. The menu is generated based on the order of the definitions in the input file; no numbering is required. A major advantage of the menu compiler is the ability to change the relative ordering of the menu and its content without drastic code modification. Format and disable characters are supported. Errors are handled in the least drastic way possible. In some cases, MC will catch errors that Red's compiler won't; protecting you from frustrating run-time errors.
  38.  
  39. ----- WRITING AN INPUT FILE
  40.  
  41. To generate a menu procedure file you must write an input file. The first two lines of the input file are special. The compiler expects to see specific data there. On lines 3 through the end of the file, the compiler expects to see menu definitions in the format described below.
  42.  
  43. LINE 1: Seperator string
  44.  
  45. It may be of any character or length, but it can be used in the document only as a seperator. Make sure it is used ONLY as a seperator. More on what it seperates below.
  46.  
  47. LINE 2: Menu name
  48.  
  49. The text that will appear in the menu bar
  50.  
  51. LINE 3 ... : Menu definitions
  52.  
  53. Menu definitions are like this: <menu-text><seperator-string><menudoes-text>
  54.  
  55. For example, suppose I want to create a menu to support GEnie's electronic mail system's command mode. Also assume that for a seperator string I will use the section symbol "§" (option-6). The file would begin like this:
  56.  
  57. §
  58. GEnie Mail
  59. Status§DISPLAY ALL^M
  60. Send§ENTER^M
  61. Read§\Comm Disk:RSPs:Read Mail.PROC
  62.  
  63. etc.
  64.  
  65. Notice that the name of the menu "GEnie Mail" is on the second line of the file. Also notice that there are no spaces between the menu-text and the seperator string and the menudoes-text.
  66.  
  67. ----- GENERATING THE MENU PROCEDURE FILE
  68.  
  69. Once the input file is finished, simply run Menu Compiler.PROC. You will be prompted for the input and output files. Run time is about 70 seconds for a 20 line menu with no errors.
  70.  
  71. The Menu Compiler will report errors if it can't find the menu-text, the seperator-string, or the menudoes-text. Since you may still be debugging, you have the option of skipping the line with the error, or aborting the whole procedure. It will also report an error if you try to compile more than 20 lines, Red Ryder's limit. Menu Compiler also checks the length of menu-text, menudoes-text and the menu name so that they are within Red Ryder's limits. In case of error, comments are truncated to 79 characters; command line errors stimulate a dialog box where you may reenter the text so that it is within the string length limitations of Red Ryder. In any case, the Menu Compiler will attempt to generate executable code if at all possible.
  72.  
  73. ----- A WARNING TO HARD DISK USERS 
  74.  
  75. I suspect that the command, USERWRITE, does not make efficient use of disk space. I strongly reccommend that hard disk owners save the output file to a floppy, then copy it onto their hard disk. 
  76.  
  77. While testing this procedure, I've notice that 20K or so of disk space has mysteriously vanished. I can reclaim that missing space when I completely copy the floppy disk onto a blank one. I don't know what else to account for it except that my program does of a lot of USEWRITE's to do the job. I can't believe its my word processor or Red's Compile command that's causing the extreme fragmentation. If you listen to the disk drive when running the Menu Compiler, you'll notice that there is a heck of a lot disk action (both reads and writes). So, draw your own conclusions, but probably better to safe than sorry. It is far easier to clean up an 800K floppy than a 60 Meg hard drive.
  78.  
  79. ----- QUESTIONS, BUG REPORTS, ACCOLADES, PROPOSALS OF MARRIAGE, ETC.
  80.  
  81. Send your correspondence to:
  82.  
  83. Creative Solutions Co.
  84. 305 So. 41st Street
  85. Philadelphia, PA 19104
  86. (215) 387-4751
  87.  
  88. or
  89.  
  90. to MAYERK via GEnie e-mail
  91.  
  92. Your comments are most welcome.
  93.  
  94. Cheers!
  95. Kenneth Mayer
  96.